TOP

VBA Function: UCase

Description

The VBA UCASE Function converts a character string to uppercase.


UCase Syntax

UCase(text)

VBA UCase Example

Converting a string to uppercase:

Sub UCaseExample()
    
     text = "Ref-45-X-876-rt"
    
     text = UCase(text)
    
     MsgBox text 'Returns: REF-45-X-876-RT
    
End Sub
The inverse function that converts to lowercase is the LCASE function.